<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/goodslx/VOL_Demo_goodslx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/goodslx/VOL_Demo_goodslx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '商品分类',
                name: 'goodslx/VOL_Demo_goodslx',
                url: "/VOL_Demo_goodslx/",
                sortName: "Id"
            });
            const editFormFields = ref({"goodsname":"","code":"","name":""});
            const editFormOptions = ref([[{"dataKey":"enable","data":[],"title":"分类名称","field":"goodsname"},
                               {"dataKey":"enable","data":[],"title":"编号","field":"code"},
                               {"dataKey":"enable","data":[],"title":"项目名称","field":"name"}]]);
            const searchFormFields = ref({"goodsname":""});
            const searchFormOptions = ref([[{"dataKey":"enable","data":[],"title":"分类名称","field":"goodsname"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'goodslxid',title:'goodslxid',type:'int',width:110,hidden:true,align:'left'},
                       {field:'goodsname',title:'分类名称',type:'string',bind:{ key:'enable',data:[]},width:220,align:'left',sort:true},
                       {field:'code',title:'编号',type:'string',bind:{ key:'enable',data:[]},width:220,align:'left'},
                       {field:'name',title:'项目名称',type:'string',bind:{ key:'enable',data:[]},width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
